<!-- <page-header [action]="phActionTpl">
  <ng-template #phActionTpl>
    <button (click)="add()" nz-button nzType="primary">新建</button>
    <button (click)="query()" nz-button nzType="primary">查询</button>
  </ng-template>
</page-header> -->
<nz-card>

 
      <sf #sersf mode="search" [schema]="searchSchema" button = "none"></sf>
 
    <div nz-row>
      <div style="text-align:right;padding-top: 5px;">
        <button (click)="add()" nz-button nzType="primary">新建</button>
        <button (click)="query()" nz-button nzType="primary">搜索</button>
      </div>
    </div>
    

  <lb-grid #st [columns]="columns" [sname]="param.sname" [queryparas]="param.queryparas"></lb-grid>
 
</nz-card>

<nz-modal
      [(nzVisible)]="isAddVisible"
      nzTitle="新增凭证目录"
      [nzFooter]="null"
      (nzOnCancel)="handleCancel()"
    >
  <sf #addSf mode="edit" [schema]="addSchema"  [button]="null" >
    <ng-template sf-template="custom" let-me let-ui="ui" let-schema="schema">
      <input
        nz-input
        [attr.id]="me.id"
        [disabled]="me.disabled"
        [attr.disabled]="me.disabled"
        [nzSize]="ui.size"
        [ngModel]="me.formProperty.value"
        (ngModelChange)="me.setValue($event)"
        (click)="bbAdd()"
        (input)="bbAdd()"
        placeholder="请点击"
      />
    </ng-template>
  </sf>
  <div class="modal-footer">
    <button nz-button type="submit" [nzType]="'primary'" (click)="saveAdd(addSf.value)" [disabled]="!addSf.valid">
    <i nz-icon nzType="save"></i>保 存
    </button>
  </div>
</nz-modal>

<nz-modal  [(nzVisible)]="isBbVisible" nzTitle="报表列表" (nzOnCancel)="handleBbCancel()" [nzFooter]="null" nzWidth="1000">
<div nz-row>
  <div nz-col nzSpan="18">
    <sf #bbsf mode="search" [schema]="bbSearchSchema" button = "none"></sf>
  </div>
  
  <div  nz-col nzSpan="6" style="text-align:right;padding-top: 5px;">
    <button (click)="bbQuery()" nz-button nzType="primary"><i nz-icon nzType="search"></i>搜索</button>
  </div>
  
</div>

 <lb-grid #bbst [columns]="bbColumns" [sname]="bbParam.sname" [queryparas]="bbParam.form"></lb-grid>
</nz-modal>

<nz-modal
      [(nzVisible)]="isUpVisible"
      nzTitle="修改凭证目录"
      [nzFooter]="null"
      (nzOnCancel)="handleCancel()"
    >
  <sf #upSf mode="edit" [schema]="upSchema" [button]="null" ></sf>
  <div class="modal-footer">
    <button nz-button type="submit" [nzType]="'primary'" (click)="saveUp()" [disabled]="!upSf.valid">
    <i nz-icon nzType="save"></i>保存修改
    </button>
  </div>
</nz-modal>

<nz-modal
[(nzVisible)]="isBqVisible"
[nzTitle]="modalBqTitle"
[nzFooter]="null"
(nzOnCancel)="handleCancel()"
>
<nz-tag *ngFor="let tag of tags; let i = index" [nzMode]="'closeable'" (nzAfterClose)="handleClose(tag)">
  {{ sliceTagName(tag) }}
</nz-tag>
<nz-tag *ngIf="!inputVisible" class="editable-tag" nzNoAnimation (click)="showInput()"> <i nz-icon nzType="plus"></i> 标签新增 </nz-tag>
<input
  #inputElement
  nz-input
  nzSize="small"
  *ngIf="inputVisible"
  type="text"
  [(ngModel)]="inputValue"
  style="width: 78px;"
  (blur)="handleInputConfirm()"
  (keydown.enter)="handleInputConfirm()"
/>
<div class="modal-footer">
  <button nz-button type="submit" [nzType]="'primary'" (click)="savepz()" >
  <i nz-icon nzType="save"></i>保存
  </button>
</div>
</nz-modal>
